For maximum flexibility we should allow running arbitrary javascript code on each object during an update. It should probably run after other modifiers.
update({_id: "foo"}. {$inc:
{count: 1, total: 5}, $function: function()
{this.avg = this.total / this.count}}
- is duplicated by
-
SERVER-10213 Allow eval() against a SINGLE document in a sharded collection (A.K.A findAndEval)
- Closed
- is related to
-
SERVER-925 support for stored js
- Closed
-
SERVER-11345 Allow update to compute expressions using referenced fields like Aggregation Framework's $project
- Closed
- related to
-
SERVER-1765 self referential updates? WAS: allow access to old row value during update
- Closed
-
SERVER-40381 Add the ability to specify a pipeline to an update command
- Closed
-
SERVER-6399 Refactor update() code
- Closed
-
SERVER-9336 Custom operators as a plug-in into aggregation framework
- Closed